﻿using System.Collections.Generic;

using Mitosoft.Definitions.Data;

namespace Prism.Common.ApplicationEvents
{
	/// <summary>
	/// Arguments used by <see cref="GenericDataBlockItemEvent"/>
	/// </summary>
	public class GenericDataBlockItemEventArguments
	{
		/// <summary>
		/// Represents <see cref="DataBlockItems"/>
		/// </summary>
		protected List<IGenericDataBlockItem<string>> _dataBlockItems;

		/// <summary>
		/// Represents <see cref="RequestingId"/>
		/// </summary>
		protected string _requestingId;

		/// <summary>
		/// Represents <see cref="ProvidingId"/>
		/// </summary>
		protected string _providingId;

		/// <summary>
		/// Represents <see cref="StartingDataId"/>
		/// </summary>
		protected ulong _startingDataId;

		/// <summary>
		/// Represents <see cref="NumberOfDataItems"/>
		/// </summary>
		protected ulong _numberOfDataItems;

		/// <summary>
		/// Represents <see cref="EvaluationIsRunning"/>
		/// </summary>
		protected bool _evaluationIsRunning;

		public GenericDataBlockItemEventArguments( List<IGenericDataBlockItem<string>> dataBlockItems, string requestingId, string providingId )
		{
			this._dataBlockItems = dataBlockItems;
			this._requestingId = requestingId;
			this._providingId = providingId;
		}

		/// <summary>
		/// Gets or sets whether these arguments are used
		/// because an evaluation has started.
		/// </summary>
		public bool EvaluationIsRunning
		{
			get
			{
				return this._evaluationIsRunning;
			}
			set
			{
				this._evaluationIsRunning = value;
			}
		}

		/// <summary>
		/// Represents the number of data which should be retrieved.
		/// </summary>
		public ulong NumberOfDataItems
		{
			get
			{
				return this._numberOfDataItems;
			}
			set
			{
				this._numberOfDataItems = value;
			}
		}

		/// <summary>
		/// Id of the data we want to start retrieving.
		/// </summary>
		public ulong StartingDataId
		{
			get
			{
				return this._startingDataId;
			}
			set
			{
				this._startingDataId = value;
			}
		}

		/// <summary>
		/// Represents the Id of the side requesting data.
		/// </summary>
		public string RequestingId
		{
			get
			{
				return this._requestingId;
			}
			set
			{
				this._requestingId = value;
			}
		}

		/// <summary>
		/// Represents the Id of the side providing data.
		/// </summary>
		public string ProvidingId
		{
			get
			{
				return this._providingId;
			}
			set
			{
				this._providingId = value;
			}
		}

		/// <summary>
		/// Contains the provided data.
		/// </summary>
		public List<IGenericDataBlockItem<string>> DataBlockItems
		{
			get
			{
				return this._dataBlockItems;
			}
			set
			{
				this._dataBlockItems = value;
			}
		}
	}
}
